class lei{
    name:string
    age?:number
    readonly sex:string='男'
    constructor(can:string){
        this.name=can
        this.age=18
    }
}
let leifn=new lei('1')

class son extends lei{
    constructor(par:string){
        super(par)
    }
    work(){
        console.log(this.name);
        
    }
}
new son('11')

let str:string='sdfgfdgd'
const unip=(str:string)=>{
let arr=str.split('')
let newarr:string[]=[]
arr.forEach(element => {
    if(newarr.indexOf(element)===-1){
        newarr.push(element)
    }
});
return newarr.join('')
}
console.log(unip(str));
const find=(word:string)=>{
    let arr=word.split('')
    let max=arr[0]
   for (let i = 0; i < arr.length; i++) {
    if(arr[i].length>max.length){
        max=arr[i]
    }
   }
   return max
}
console.log(find('the bulud good'));
